﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace Krile.Forms.MainForm.Controls.XTab
{
    public class KrileXTab : XTab
    {
        protected override void MouseManagerInit()
        {
            mouseMngr = new KrileXTabMouseManager(this);
        }

        public override System.Drawing.Size MaxTabSize
        {
            get
            {
                if (Core.Config != null)
                    return Core.Config.Appearance.TabAppearance.MaxSize;
                else
                    return new Size(200, 20);
            }
            set { }
        }

        public override bool FixedSize
        {
            get
            {
                if (Core.Config != null)
                    return Core.Config.Appearance.TabAppearance.FixedSize;
                else
                    return true;
            }
            set { }
        }

        public override bool MultiLineMode
        {
            get
            {
                if (Core.Config != null)
                    return Core.Config.Appearance.TabAppearance.UseMultiline;
                else
                    return true;
            }
            set { }
        }

        public bool IsWindowTab = false;

        public void ColorInit()
        {
            switch (Core.Config.Appearance.ToolStripDesign)
            {
                case Krile.Cores.Config._Appearance.ToolStripDesigns.Blue:
                    topColor = Color.FromArgb(173, 209, 255);
                    break;
                case Krile.Cores.Config._Appearance.ToolStripDesigns.Black:
                    topColor = Color.FromArgb(205, 208, 213);
                    break;
                case Krile.Cores.Config._Appearance.ToolStripDesigns.Silver:
                    topColor = Color.FromArgb(243, 244, 250);
                    break;
                default:
                    topColor = SystemColors.Control;
                    break;
            }
        }
    }
}
